//
//  WMGCDTimer.h
//  WonderCommon
//
//  Created by zero on 2020/5/13.
//  Copyright © 2020 wenhaoChan. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface WCGCDTimer : NSObject

- (instancetype)initWithTimeInterval:(NSTimeInterval)interval
                              repeat:(BOOL)repeat
                               block:(dispatch_block_t)block;

- (instancetype)initWithTimeInterval:(NSTimeInterval)interval
                              repeat:(BOOL)repeat
                               queue:(dispatch_queue_t)queue
                               block:(dispatch_block_t)block;

+ (instancetype)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
                                        repeat:(BOOL)repeat
                                         queue:(dispatch_queue_t)queue
                                         block:(dispatch_block_t)block;

+ (instancetype)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
                                        repeat:(BOOL)repeat
                                         block:(dispatch_block_t)block;

- (void)setTimeInterval:(NSTimeInterval)interval;

- (void)stop;

- (void)restart;

- (void)invalidate;


@end

NS_ASSUME_NONNULL_END
